package com.etc;

import java.io.IOException;

import org.springframework.http.HttpRequest;
import org.springframework.http.client.ClientHttpRequestExecution;
import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.ClientHttpResponse;

public class CustomHttpRequestInterceptor implements ClientHttpRequestInterceptor {
 
 @Override
 public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException {
  System.out.println("Request , url:{},method:{}."+ request.getURI()+"@"+ request.getMethod());
  return execution.execute(request, body);
 }
}